package com.frxuexi.lib_base.db

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.frxuexi.lib_base.entity.SearchBean

@Dao
interface SearchDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun addSearch(searchBean: SearchBean):Long

    @Query("select * from search order by id desc")
    fun querySearch():List<SearchBean>


    @Delete
    fun deleteSearch(searchBean: SearchBean):Int
}